﻿using System;

// Token: 0x020001E5 RID: 485
public class SizeChangeAction : AgentAction
{
	// Token: 0x06000A54 RID: 2644 RVA: 0x0005A733 File Offset: 0x00058933
	public SizeChangeAction(float factor) : this(factor, 1f, true)
	{
	}

	// Token: 0x06000A55 RID: 2645 RVA: 0x0005A742 File Offset: 0x00058942
	public SizeChangeAction(float factor, float duration) : this(factor, duration, false)
	{
	}

	// Token: 0x06000A56 RID: 2646 RVA: 0x0005A74D File Offset: 0x0005894D
	private SizeChangeAction(float factor, float duration, bool loop)
	{
		this.name = "SizeChange: " + factor;
		this.priority = true;
		this.resizer = new ResizeManager.Resizer(duration, factor, loop);
	}

	// Token: 0x06000A57 RID: 2647 RVA: 0x0005A787 File Offset: 0x00058987
	public override bool CanDoBoth(AgentAction anotherAction)
	{
		return this.async;
	}

	// Token: 0x06000A58 RID: 2648 RVA: 0x0005A78F File Offset: 0x0005898F
	public override void StartAction()
	{
		this.sizeChanger = (this.agent.GetComponent<ResizeManager>() ?? this.agent.gameObject.AddComponent<ResizeManager>());
		this.sizeChanger.AddResizer(this.resizer);
	}

	// Token: 0x06000A59 RID: 2649 RVA: 0x0005A7CA File Offset: 0x000589CA
	public override bool IsCompleted()
	{
		return this.hasStarted && this.resizer.IsCompleted();
	}

	// Token: 0x06000A5A RID: 2650 RVA: 0x0005A7E5 File Offset: 0x000589E5
	public override void Interrupt()
	{
		this.resizer.Interrupt();
	}

	// Token: 0x04000FA7 RID: 4007
	private ResizeManager sizeChanger;

	// Token: 0x04000FA8 RID: 4008
	private ResizeManager.Resizer resizer;

	// Token: 0x04000FA9 RID: 4009
	public bool async = true;
}
